#ifndef TYPES_H_
#define TYPES_H_

typedef enum _boolean {
	s_false = 0x00,
	s_true
} s_boolean;

typedef char s_byte;
typedef short s_short;
typedef int s_int;
typedef float s_float;
typedef long s_long;
typedef double s_double;
typedef void* s_ptr;

#define s_null ((s_ptr)0)

typedef unsigned char s_ubyte;
typedef unsigned short s_ushort;
typedef unsigned int s_uint;
typedef unsigned long s_ulong;

typedef unsigned int s_char;	//UTF-8 character (1, 2, 3, or 4 byte)

typedef struct _string {
	s_uint size;				//UTF-8 bytes + \0
	s_ubyte* data;				//UTF-8 data
	s_uint length;				//UTF-8 characters
} s_string;

typedef struct _buffer {
	s_ubyte* data;
	s_uint size;
} s_buffer;

typedef struct _ref {
	s_ptr ptr;
	s_uint count;
} s_ref;

#endif /*TYPES_H_*/
